package com.yaoli.SheJiMoShi.Decorator;

/**
 * Created by YaoLi on 2017/9/29.
 *
 *
 */
public class Main {
    public static void main(String[] args) {
        Person person = new Man();

        person = new ManDecoratorFly(person);

        person = new ManDecoratorSwimming(person);

        person = new ManDecoratorRun(person);

//        person = new ManDecoratorFly(new ManDecoratorSwimming(new ManDecoratorRun(person)));

//        person = new ManDecoratorRun(new ManDecoratorSwimming(new ManDecoratorFly(person)));

        person.introduce("姚立",25);
    }
}
